<?php

require_once 'common/conn.php';

$data = array();
if (isset($_GET['usercode'])) {
    $usercode = $_GET['usercode'];
    $db = new DBC();
    $sql = "SELECT name FROM t_hibaby_title_packet WHERE name IN(SELECT titlecode FROM t_hibaby_title_packet_record WHERE usercode = '" . trim($usercode) . "') GROUP BY name";
    $data = $db->fetchData($sql);
}
echo json_encode($data);
?>